package cn.yj.config;

import org.springframework.boot.context.properties.ConfigurationProperties;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author 永健
 * @since 2021-05-07 13:48
 */
@ConfigurationProperties(prefix = SchoolCBDConfig.PRIFIX)
public class SchoolCBDConfig {
    static final String PRIFIX = "school-cbd";

    private List<String> adminCode;

    private SchoolCBDConfig.IntegralConfig integralConfig = new SchoolCBDConfig.IntegralConfig();
    private SchoolCBDConfig.TaskConfig taskConfig = new SchoolCBDConfig.TaskConfig();

    public IntegralConfig getIntegralConfig() {
        return integralConfig;
    }

    public SchoolCBDConfig setIntegralConfig(IntegralConfig integralConfig) {
        this.integralConfig = integralConfig;
        return this;
    }

    public TaskConfig getTaskConfig() {
        return taskConfig;
    }

    public SchoolCBDConfig setTaskConfig(TaskConfig taskConfig) {
        this.taskConfig = taskConfig;
        return this;
    }

    public static class TaskConfig{
        private String delayTime;
        private String reloadCron;

        public String getDelayTime() {
            return delayTime;
        }

        public TaskConfig setDelayTime(String delayTime) {
            this.delayTime = delayTime;
            return this;
        }

        public String getReloadCron() {
            return reloadCron;
        }

        public TaskConfig setReloadCron(String reloadCron) {
            this.reloadCron = reloadCron;
            return this;
        }
    }

    public static class IntegralConfig {
        private BigDecimal other;
        private BigDecimal register;
        private BigDecimal keepSign;
        private BigDecimal singIn;
        private BigDecimal share;
        private Integer keepDay;
        private Integer minCash;
        private Integer maxCash;
        private BigDecimal moneyOne;
        private String tip;
        private String ruleRemark;
        private Integer receiverMaxCount;
        private Integer publishMaxCount;

        public BigDecimal   getOther() {
            return other;
        }

        public IntegralConfig setOther(BigDecimal other) {
            this.other = other;
            return this;
        }

        public BigDecimal getRegister() {
            return register;
        }

        public IntegralConfig setRegister(BigDecimal register) {
            this.register = register;
            return this;
        }

        public Integer getKeepDay() {
            return keepDay;
        }

        public IntegralConfig setKeepDay(Integer keepDay) {
            this.keepDay = keepDay;
            return this;
        }

        public BigDecimal getKeepSign() {
            return keepSign;
        }

        public IntegralConfig setKeepSign(BigDecimal keepSign) {
            this.keepSign = keepSign;
            return this;
        }

        public BigDecimal getMoneyOne() {
            return moneyOne;
        }

        public IntegralConfig setMoneyOne(BigDecimal moneyOne) {
            this.moneyOne = moneyOne;
            return this;
        }

        public BigDecimal getSingIn() {
            return singIn;
        }

        public IntegralConfig setSingIn(BigDecimal singIn) {
            this.singIn = singIn;
            return this;
        }

        public BigDecimal getShare() {
            return share;
        }

        public IntegralConfig setShare(BigDecimal share) {
            this.share = share;
            return this;
        }

        public String getTip() {
            return tip;
        }

        public IntegralConfig setTip(String tip) {
            this.tip = tip;
            return this;
        }

        public String getRuleRemark() {
            return ruleRemark;
        }

        public IntegralConfig setRuleRemark(String ruleRemark) {
            this.ruleRemark = ruleRemark;
            return this;
        }

        public Integer getReceiverMaxCount() {
            return receiverMaxCount;
        }

        public IntegralConfig setReceiverMaxCount(Integer receiverMaxCount) {
            this.receiverMaxCount = receiverMaxCount;
            return this;
        }

        public Integer getPublishMaxCount() {
            return publishMaxCount;
        }

        public IntegralConfig setPublishMaxCount(Integer publishMaxCount) {
            this.publishMaxCount = publishMaxCount;
            return this;
        }

        public Integer getMinCash() {
            return minCash;
        }

        public IntegralConfig setMinCash(Integer minCash) {
            this.minCash = minCash;
            return this;
        }

        public Integer getMaxCash() {
            return maxCash;
        }

        public IntegralConfig setMaxCash(Integer maxCash) {
            this.maxCash = maxCash;
            return this;
        }
    }

    public List<String> getAdminCode() {
        return adminCode;
    }

    public SchoolCBDConfig setAdminCode(List<String> adminCode) {
        this.adminCode = adminCode;
        return this;
    }
}
